import { request } from '@/utils/sph'
import { category1, category2, category3 } from './model'
/**
 * @description  获取一级类别数据
 * @returns 
 */
export const reqCategory1Data=()=>{
    return request.get<any,category1[]>('/admin/product/getCategory1')
}

/**
 * @description  获取二级类别数据
 * @param id 一级类别的指定id
 * @returns 
 */
export const reqCategory2Data=(id:number)=>{
    return request.get<any,category2[]>(`/admin/product/getCategory2/${id}`)
}

/**
 * @description  获取三级类别数据
 * @param id 二级类别的指定id
 * @returns 
 */
export const reqCategory3Data=(id:number)=>{
    return request.get<any,category3[]>(`/admin/product/getCategory3/${id}`)
}